import { Entity, Column, Unique, Index } from 'typeorm'
import { BaseEntity } from '../global'

@Entity('global_queue')
export class GlobalQueue extends BaseEntity {
    @Column({ length: 32, comment: '队列ID' })
    queueid: string

    @Column({ length: 256, comment: '队列名称' })
    queueName: string

    @Column('text', { nullable: true, comment: '需要处理的数据' })
    queueData: string

    @Column('text', { nullable: true, comment: '返回值' })
    queueValue: string

    @Column('text', { nullable: true, comment: '错误信息' })
    queueFail: string

    @Column('text', { nullable: true, comment: '错误堆栈' })
    queueStacktrace: string

    @Column('int', { default: 0, comment: '0失败1成功' })
    queueStatus: number

    @Column('int', { default: 0, comment: '重试次数' })
    queueRetry: number
}
